import jdk.nashorn.internal.ir.CallNode;

public class FacadeTest {
    public static void main(String[] args) {
        Facade facade = new Facade();
        facade.doSomethingFacade();
    }
}
//客户端
class Client1{
    Facade facade = new Facade();


    public void doSomething1(){
       facade.doSomethingFacade();
    }
}
class Client2{
        Facade facade = new Facade();
    public void doSomething2(){
        facade.doSomethingFacade();
    }
}
class Facade{
    System1 system1 = new System1();
    System2 system2 = new System2();
    System3 system3 = new System3();
    public void doSomethingFacade(){
        system1.method1();
        system2.method2();
        system3.method3();
    }
}
//不同功能的系统
class System1{
    public void method1(){
        System.out.println("系统1");
    }
}
class System2{
    public void method2(){
        System.out.println("系统2");
    }
}
class System3{
    public void method3(){
        System.out.println("系统3");
    }
}